package com.hsc.yalebao.adapter;

import android.content.Context;
import android.content.res.Resources;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.hsc.yalebao.model.XianXiaResultBean.ResultBean;
import java.util.ArrayList;

public class XianXiaJiLuListViewAdapter extends BaseAdapter
{
  private static final int TYPE_BANK = 0;
  private static final int TYPE_OTHER = 1;
  private Context context;
  private ArrayList<XianXiaResultBean.ResultBean> messageList;

  public XianXiaJiLuListViewAdapter(Context paramContext, ArrayList<XianXiaResultBean.ResultBean> paramArrayList)
  {
    this.messageList = paramArrayList;
    this.context = paramContext;
  }

  public int getCount()
  {
    if (this.messageList == null)
      return 0;
    return this.messageList.size();
  }

  public Object getItem(int paramInt)
  {
    return this.messageList.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public int getItemViewType(int paramInt)
  {
    if ("1".equals(((XianXiaResultBean.ResultBean)this.messageList.get(paramInt)).payment_id))
      return 0;
    return 1;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    ViewHolder localViewHolder;
    label178: XianXiaResultBean.ResultBean localResultBean;
    if (paramView == null)
    {
      localViewHolder = new ViewHolder();
      if (getItemViewType(paramInt) == 0)
      {
        paramView = View.inflate(this.context, 2130903191, null);
        localViewHolder.tv_status = ((TextView)paramView.findViewById(2131100278));
        localViewHolder.tv_sys_bank_name = ((TextView)paramView.findViewById(2131100279));
        localViewHolder.tv_sy_real_name = ((TextView)paramView.findViewById(2131100280));
        localViewHolder.tv_address = ((TextView)paramView.findViewById(2131100284));
        localViewHolder.tv_sys_bank_card = ((TextView)paramView.findViewById(2131100285));
        localViewHolder.tv_real_name = ((TextView)paramView.findViewById(2131100147));
        localViewHolder.tv_bank_card = ((TextView)paramView.findViewById(2131100281));
        localViewHolder.tv_amount = ((TextView)paramView.findViewById(2131100282));
        localViewHolder.tv_add_time = ((TextView)paramView.findViewById(2131100283));
        localViewHolder.tv_paytype = ((TextView)paramView.findViewById(2131100286));
        paramView.setTag(localViewHolder);
        localResultBean = (XianXiaResultBean.ResultBean)this.messageList.get(paramInt);
        if (getItemViewType(paramInt) != 0)
          break label706;
        if (!"1".equals(localResultBean.status))
          break label614;
        localViewHolder.tv_status.setText("审核通过");
        localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165214));
      }
    }
    while (true)
    {
      localViewHolder.tv_sys_bank_name.setText(localResultBean.sys_bank_name);
      localViewHolder.tv_sy_real_name.setText(localResultBean.sy_real_name);
      localViewHolder.tv_address.setText(localResultBean.address);
      localViewHolder.tv_sys_bank_card.setText(localResultBean.sys_bank_card);
      localViewHolder.tv_real_name.setText(localResultBean.real_name);
      localViewHolder.tv_bank_card.setText(localResultBean.bank_card);
      localViewHolder.tv_amount.setText(localResultBean.amount + "元");
      localViewHolder.tv_add_time.setText(localResultBean.add_time);
      localViewHolder.tv_paytype.setText("银行转账");
      return paramView;
      if (getItemViewType(paramInt) != 1)
        break;
      paramView = View.inflate(this.context, 2130903190, null);
      localViewHolder.tv_payment_id = ((TextView)paramView.findViewById(2131100277));
      localViewHolder.tv_status = ((TextView)paramView.findViewById(2131100278));
      localViewHolder.tv_sys_bank_name = ((TextView)paramView.findViewById(2131100279));
      localViewHolder.tv_sy_real_name = ((TextView)paramView.findViewById(2131100280));
      localViewHolder.tv_real_name = ((TextView)paramView.findViewById(2131100147));
      localViewHolder.tv_bank_card = ((TextView)paramView.findViewById(2131100281));
      localViewHolder.tv_amount = ((TextView)paramView.findViewById(2131100282));
      localViewHolder.tv_add_time = ((TextView)paramView.findViewById(2131100283));
      break;
      localViewHolder = (ViewHolder)paramView.getTag();
      break label178;
      label614: if ("0".equals(localResultBean.status))
      {
        localViewHolder.tv_status.setText("正在审核");
        localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165336));
      }
      else if ("2".equals(localResultBean.status))
      {
        localViewHolder.tv_status.setText("审核失败");
        localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165321));
      }
    }
    label706: if ("1".equals(localResultBean.status))
    {
      localViewHolder.tv_status.setText("审核通过");
      localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165214));
      if (!"2".equals(localResultBean.payment_id))
        break label1027;
      localViewHolder.tv_payment_id.setText("支付宝");
    }
    while (true)
    {
      localViewHolder.tv_sys_bank_name.setText(localResultBean.sys_bank_name);
      localViewHolder.tv_sy_real_name.setText(localResultBean.sy_real_name);
      localViewHolder.tv_real_name.setText(localResultBean.real_name);
      localViewHolder.tv_bank_card.setText(localResultBean.bank_card);
      localViewHolder.tv_amount.setText(localResultBean.amount + "元");
      localViewHolder.tv_add_time.setText(localResultBean.add_time);
      return paramView;
      if ("0".equals(localResultBean.status))
      {
        localViewHolder.tv_status.setText("正在审核");
        localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165336));
        break;
      }
      if (!"2".equals(localResultBean.status))
        break;
      localViewHolder.tv_status.setText("审核失败");
      localViewHolder.tv_status.setTextColor(this.context.getResources().getColor(2131165321));
      break;
      label1027: if ("3".equals(localResultBean.payment_id))
        localViewHolder.tv_payment_id.setText("微信");
      else if ("1".equals(localResultBean.payment_id))
        localViewHolder.tv_payment_id.setText("银行转账");
    }
  }

  public int getViewTypeCount()
  {
    return 2;
  }

  public void setData(ArrayList<XianXiaResultBean.ResultBean> paramArrayList)
  {
    this.messageList = paramArrayList;
  }

  static class ViewHolder
  {
    public TextView tv_add_time;
    public TextView tv_address;
    public TextView tv_amount;
    public TextView tv_bank_card;
    public TextView tv_payment_id;
    public TextView tv_paytype;
    public TextView tv_real_name;
    public TextView tv_status;
    public TextView tv_sy_real_name;
    public TextView tv_sys_bank_card;
    public TextView tv_sys_bank_name;
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.adapter.XianXiaJiLuListViewAdapter
 * JD-Core Version:    0.6.2
 */